﻿<%template _header%>
<!--header end-->



<script type="text/javascript">
	var opwdok = false;
	var pwdok = false;
	var pwd1ok = false;
	
	function checkform()
	{
	
	   if(pwd1ok == false) pwd1ok = checkpwd1();
	   if(pwdok == false) pwdok = checkpwd2();
	   if(pwd1ok && pwdok){ 
	      var f = _$("pwdform");
	      f.submit();
	    }
	}
	

	  function checkpwd1()
	  {
	  	  var pwd1 = _$("newpassword").value;
	  	  if(pwd1 == "") {
			  	_$("pwdResult").innerHTML = "<font color='#009900'>请输入新密码</font>";
			  	pwd1ok = false;
			  	return false;
			  }
			  else if(pwd1.length < 6){
			  	_$("pwdResult").innerHTML = "<font color='#009900'>不得少于6个字符</font>";
			  	pwd1ok = false;
			  	return false;
			  }
			  pwd1ok = true;
			  _$("pwdResult").innerHTML = "";
			  return true;
	  }
		
		function checkpwd2()
		{
			  _$("pwd2Result").innerHTML= "";
			  if(pwd1ok == false) return false;
			  
			  var pwd1 = _$("newpassword").value;
			  var pwd2 = _$("newpassword2").value;
			  document.getElementById("pwd2Result").innerHTML = "";
			  
			  if(pwd1 != pwd2)
			  {
			  	_$("pwd2Result").innerHTML = "<font color='#009900'>两次输入的密码不一致</font>";
			  	pwdok = false;
			  	return false;
			  }
			  
			  pwdok = true;
			  return true;
		}
</script>

<!--主体-->
<div class="layout-cols2">
	<div class="col1">
		<div class="box">
		<div class="caption">重置密码</div>
			<div class="content">

					<%if ErrorCount==0%>
					
						<%if IsPost%>
						
							<%template _msgbox%>
							
						<%else%>
						
							<form action="" method="post" ID="pwdform">
							<table width ="100%" class ="table-box">
				
								
								<tr><td width="100">
								<label for="newpassword">新密码:</label>
								</td><td>	
								<input name="newpassword" type="password" class="colorblue" id="newpassword" 
								       onfocus="this.className='colorfocus';" 
								       onblur="this.className='colorblue'; checkpwd1();" 
								       size="20" />&nbsp;<span id="pwdResult">不得少于6个字符</span>
							    </td></tr>
								
								<tr><td>
								<label for="newpassword2">重复新密码:</label>
								</td><td>
								<input name="newpassword2" type="password" class="colorblue" id="newpassword2" 
								       onfocus="this.className='colorfocus';" 
								       onblur="this.className='colorblue'; checkpwd2();"
								       size="20" />&nbsp;<span id="pwd2Result"></span>
								</td></tr>
								 <tr><td colspan ="2" align ="right"> 								
								<label for="Submit">&nbsp;</label>
								<input type="button" name="btnSubmit" value="确定" class="buttonstyle" 
								       ID="btnSubmit" onclick="checkform();"/>
								 </td></tr>
								     
						</table>
							</form>
							
						<%/if%>
						
						</div>
						
					<%else%>
						<%template _memerrmsgbox%>
					<%/if%>
					
	</div>
</div>
<div class="col2">
<div class="box">
<div class="caption">加入优医网你可以：</div>
<div class="content">

<li>寻找和你一样的病人</li>
<li>找到专业的医生</li>
<li>共享你的信息，得到更多帮助</li>
<li>与相同的病人交流分享</li>

</div>
</div>
</div>
<!--主体-->
</div>
<%template _footer%>

